package com.luna.beans;

public class User {

    /*
     ＊　state - 1: 管理员 0: 普通用户 -1: 封禁用户
     */

    private int id;
    private String name;
    private String password;
    private String nickname;
    private int state;

    public User(String name, String nickname, String password) {
        this.name = name;
        this.nickname = nickname;
        this.password = password;
    }

    public User(int id, String name, String nickname, int state) {
        this.id = id;
        this.name = name;
        this.nickname = nickname;
        this.state = state;
        this.password = "";
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "UserBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", nickname='" + nickname + '\'' +
                ", state=" + state +
                '}';
    }
}
